Barcode Xpress for Java v13.1 - Updated
Code 39
User Guide > Concepts > Barcode Specifications > Barcode Types > Code 39

Code 39 is widely used in many industries across the world. It is the standard for many government barcode specifications, including the U.S. Department of Defense. Code 39 is also known as Code 3 of 9.

Code 39 was the first alphanumeric symbology. Its character set includes the digits 0-9, the letters A-Z (uppercase only), and the following symbols: space, minus "-", plus "+", period ".", dollar sign "$", slash "/", and percent "%". Barcode Xpress for Java generates an error if you have characters in your barcode value that are not allowed.

Each data character is made up of 5 bars and 4 spaces for a total of 9 elements. Each character includes 3 wide and 6 narrow elements. Thus, 3 out of the 9 elements are always wide, which is the reason why the code is sometimes called "3 of 9".

The ratio of wide to narrow bar width can be in the range of 1.8 to 3.4. The barcode engine Code 39 uses a 2:1 wide to narrow bar width ratio.

If you plan to detect Code 39 barcodes, you should set the type parameter to this type so that the barcode engine specifically looks for Code 39. If you don’t tell the barcode engine to specifically look for Code 39 barcodes, it might confuse a Code 39 barcode with a Code 32 barcode.

An example: